<template>
<!-- 修改 -->
  <div style="height: 100%;" >
    <el-menu
      default-active="1"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose"
      background-color="#F9F9F9"
      text-color="#000000"
      active-text-color="#3C8CFF" style="height: 100%;">
      <div >
        <el-image class="pointer" :src="logoSrc"  @click="$router.push('/index')"></el-image>
      </div>
      <el-menu-item index="1">
        <span slot="title">
          <router-link to="/index/AllFiles"><i class="el-icon-menu"></i>
            <span class="mobileHide">全部</span>
          </router-link>
        </span>
      </el-menu-item>
      <el-menu-item index="2">
        <span slot="title">
          <router-link to="/index/FilesType/1/document"><i class="el-icon-document"></i>
            <span class="mobileHide">文档</span>
          </router-link>
        </span>
      </el-menu-item>

      <el-menu-item index="3">
        <span slot="title">
          <router-link to="/index/FilesType/2/code"><i class="el-icon-coin"></i>
            <span class="mobileHide">代码</span>
          </router-link>
        </span>
      </el-menu-item>

      <el-menu-item index="4">
        <span slot="title">
          <router-link to="/index/FilesType/3/compressedFile"><i class="el-icon-box"></i>
            <span class="mobileHide">压缩</span></router-link>
        </span>
      </el-menu-item>
      <el-menu-item index="5">
        <span slot="title">
          <router-link to="/index/FilesType/4/image"><i class="el-icon-picture-outline"></i>
            <span class="mobileHide">图片</span></router-link>
        </span>
      </el-menu-item>
      <el-menu-item index="6">
        <span slot="title">
          <router-link to="/index/FilesType/5/audio"><i class="el-icon-headset"></i>
            <span class="mobileHide">音频</span></router-link>
        </span>
      </el-menu-item>
      <el-menu-item index="7">
        <span slot="title">
          <router-link to="/index/FilesType/6/video"><i class="el-icon-video-camera"></i>
            <span class="mobileHide">视频</span></router-link>
        </span>
      </el-menu-item>

      <el-menu-item index="8">
        <span slot="title">
          <router-link to="/index/FilesType/7/other"><i class="el-icon-more-outline"></i>
            <span class="mobileHide">其他</span></router-link>
        </span>
      </el-menu-item>

    </el-menu>
  </div>
</template>

<script>
import logoL from "../img/logo_l.png";

export default {
  name: "NavLeft",
  data() {
    return {
      logoSrc: logoL
    }
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
  }
}
</script>

<style scoped>
.router-link-active {
  text-decoration: none;
  color: #3C8CFF;
}

a {
  text-decoration: none;
  color: #000000;
}
.pointer:hover {
  cursor: pointer;
  color: #409EFF;
}
</style>
